const mutations = {
  // 修改播放状态 是否播放
  setPlayingState(state, playing) {
    state.playing = playing
  },
  // 设置顺序播放列表
  setSequenceList(state, sequenceList) {
    state.sequenceList = sequenceList
  },
  // 设置真实播放列表
  setPlayList(state, playList) {
    state.playList = playList
  },
  // 播放模式
  setPlayMode(state, mode) {
    state.playMode = mode
  },
  // 当前播放歌曲
  setCurrentIndex(state, currentIndex) {
    state.currentIndex = currentIndex
  },
  // 全屏还是收缩
  setFullScreen(state, fullScreen) {
    state.fullScreen = fullScreen
  },
  // 收藏歌曲列表
  setFavoriteList(state, list) {
    state.favoriteList = list
  },
  // 添加歌词
  addSongLyric(state, { song, lyric }) {
    state.sequenceList.map((item) => {
      if (item.mid === song.mid) {
        item.lyric = lyric
      }
      return item
    })
  }
}

export default mutations
